package reservation.tools;

import java.util.ArrayList;

import com.dhtmlx.planner.data.DHXCollection;

public class Local extends DHXCollection{
	
	public String name;
	public String key;
	public ArrayList<DHXCollection> children = null;
	public String country;
	public String city;
	public String street;
	public String localnumber;
	
	public Local(String value, String label, String country, String city, String street, String localnumber) {
      	super(value, label);
      	setKey(value);
      	setName(label);
      	setCity(city);
      	setCountry(country);
      	setStreet(street);
      	setLocalnumber(localnumber);
}
	
	
	protected void render() {
		setLabel(this.country+", "+this.city+", "+this.street+", "+this.localnumber);
}

public Iterable<DHXCollection> getChildren() {
      	return children;
}
public void setChildren(ArrayList<DHXCollection> children) {
      	this.children = children;
}
public void addChild(DHXCollection child) {
      	if (children == null)
                    	children = new ArrayList<DHXCollection>();
      	children.add(child);
}

public String getKey() {
      	return key;
}
public void setKey(String key) {
      	this.key = key;
}


public String getCountry() {
	return country;
}


public void setCountry(String country) {
	this.country = country;
	render();
}


public String getCity() {
	return city;
}


public void setCity(String city) {
	this.city = city;
	render();
}


public String getStreet() {
	return street;
}


public void setStreet(String street) {
	this.street = street;
	render();
}



	public String getLocalnumber() {
	return localnumber;
}


public void setLocalnumber(String localnumber) {
	this.localnumber = localnumber;
	render();
}


	public String getName() {
      	return name;
}

public void setName(String name) {
      	this.name = name;
      	render();
}


	

}
